/*
 * @Descripttion: 其它
 * @Author: liuxiaoling
 * @Date: 2021-03-22 19:07:54
 * @LastEditors: liuxiaoling
 * @LastEditTime: 2021-04-17 18:07:43
 */

import qs from 'qs'
import request from '@/utils/request'

const others = {
  // 我的下家
  reqMyRecommendPersons (params) {
    return request({
      url: `/api/user/invitation/list`,
      method: 'get',
      params: params,
      hideloading: true
    })
  },

  // 我的下家的下家用户列表
  reqMyDSPersons (params) {
    return request({
      url: `/api/user/invitation/list2`,
      method: 'get',
      params: params,
      hideloading: true
    })
  },

  //下家详情
  reqMyRecommendPersondetail (params) {
    return request({
      url: `/api/user/invitation/detail`,
      method: 'get',
      params: params,
      hideloading: true
    })
  },
  // 注册页面的url地址
  reqDownLoadUrl () {
    return request({
      url: '/api/tool/config',
      method: 'post'
    })
  },

  // 省、市、区、乡镇、居委会
  reqAllAddress (id) {
    return request({
      url: `/api/regions/get/${id}`,
      method: 'get',
      hideloading: true
    })
  },

  // 所有城市列表（按照字母A、B、C...排序）
  reqGroupCity () {
    return request({
      url: '/api/regions/get/groupcity',
      method: 'get',
      hideloading: false
    })
  },

  // 增加渠道
  reqAddChannel(params) {
    return request({
      url: '/api/user/createchannel',
      method: 'post',
      data: qs.stringify(params)
    })
  },

  reqChannelArr () {
    return request({
      url: '/api/user/getchannel',
      method: 'get',
      hideloading: false
    })
  },

  // 校验其他公司是否可以转发
  otherCompanyCanShareJob(jobId){
    return request({
      url: `/api/jobs/getForwardAudit?jobId=${jobId}`,
      method: 'get',
      hideloading: true,
    })
  },


  // 发布职位
  addJobSheetInfo(params) {
    return request({
      url: '/api/jobs/caiji/add',
      method: 'post',
      data: qs.stringify(params)
    })
  },


  // 删除收集表
  deleteJobSheet(id){
    return request({
      url: `/api/jobs/caiji/del?ids=${id}`,
      method: 'get',
      hideloading: true,
    })
  },

  // 采集表列表接口
  //工作信息首页数据
  reqGetJobSheetLists(params) {
    return request({
      url: `/api/jobs/caiji/list`,
      method: 'get',
      params,
      hideloading: false
    })
  },


  // 收集表详情
  reqJobSheetDetailObj(id) {
    return request({
      url: `/api/jobs/caiji/get?ids=${id}`,
      method: 'get',
      hideloading: false
    })
  },

  // 我获得的推广激励股份数
  getInvitatioStockNum (params) {
    return request({
      url: `/api/stock/getInvitatioStockNum`,
      method: 'get',
      params: params,
      hideloading: true
    })
  },

  // 我获得的推广激励股份列表
  getInvitatioStocks(params) {
    return request({
      url: `/api/stock/list/getInvitatioStocks`,
      method: 'get',
      hideloading: true,
      params
    })
  },

  // 我获得的推广激励股份详情
  getInvitatioStockDetail(params) {
    return request({
      url: `/api/stock/getInvitatioStockDetail`,
      method: 'get',
      hideloading: true,
      params
    })
  },

  // 全部领取待领取的股份
  takeInvitatioStock() {
    return request({
      url: `/api/stock/takeInvitatioStock`,
      method: 'post',
      hideloading: true,
    })
  },




  // 使用助手的接口
  getsssistanttype(params) {
    return request({
      url: `/api/learning/getsssistanttype`,
      method: 'post',
      hideloading: true,
      data: qs.stringify(params)
    })
  },


  getallsssistanttype_allMenu(params) {
    return request({
      url: `api/learning/getallsssistanttype`,
      method: 'post',
      hideloading: false,
      // data: qs.stringify(params)
    })
  },

  // todo data的不同传值问题
  scaleSvcAndRestartMicro(params) {
    return request({
      url: `/api/miroserv/scaleSvcAndRestart`,
      method: 'post',
      hideloading: true,
      // 非序列化，这样处理
      data: params,
    })
  },



  getassistantbytypekey(params) {
    return request({
      url: `/api/learning/getassistantbytypekey`,
      method: 'post',
      hideloading: false,
      // 序列化形式
      data: qs.stringify(params)
    })
  },

  getassistantbyName(params) {
    return request({
      url: `/api/learning/getassistantbyname`,
      method: 'post',
      hideloading: false,
      data: qs.stringify(params)
    })
  },
  // 主动扫码待领取列表
  getscanningcodestocklist(params) {
    return request({
      url: `/api/stock/GetScanningCodeStockList?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}&userId=${params.userId}`,
      method: 'post',
      hideloading: false,
      data: qs.stringify(params)
    })
  },
  // 被动扫码待领取列表
  getreceivestockList(params) {
    return request({
      url: `/api/stock/GetReceiveStockList?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}&userId=${params.userId}`,
      method: 'post',
      hideloading: false,
      data: qs.stringify(params)
    })
  },
  // 主动扫码领取
  taskscanningstock(params) {
    return request({
      url: `/api/stock/TaskScanningStock?userId=${params.userId}`,
      method: 'post',
      hideloading: false,
      data: qs.stringify(params)
    })
  },
  // 推广人领取
  taskpromotionstock(params) {
    return request({
      url: `/api/stock/TaskPromotionStock?userId=${params.userId}&collectType=${params.collectType}`,
      method: 'post',
      hideloading: false,
      data: qs.stringify(params)
    })
  },
  //被动扫码领取
  taskreceivestock(params) {
    return request({
      url: `/api/stock/TaskReceiveStock?userId=${params.userId}&collectType=${params.collectType}`,
      method: 'post',
      hideloading: false,
      data: qs.stringify(params)
    })
  },
  //推广人扫码领取列表
  getpromotionstocklist(params) {
    return request({
      url: `/api/stock/GetPromotionStockList?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}&userId=${params.userId}`,
      method: 'post',
      hideloading: false,
      data: qs.stringify(params)
    })
  },
  
  getcollectstocklist(params) {
    return request({
      url: `/api/stock/GetCollectStockList?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}&collectType=${params.collectType}&userId=${params.userId}`,
      method: 'post',
      hideloading: false,
      data: qs.stringify(params)
    })
  },
}

export default others
